package com.vcredit.creditcat.service;

import com.vcredit.creditcat.model.UserTemp;
import com.vcredit.creditcat.model.UserTempExt;
import com.vcredit.creditcat.persistence.UserTempExtMapper;
import com.vcredit.creditcat.persistence.base.UserTempMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by liaoshengjun on 2017/7/17.
 */
@Service
public class UserTempService {
    @Autowired
    private UserTempMapper mapper;
    @Autowired
    private UserTempExtMapper extMapper;

    public void insert(UserTemp obj) {
        mapper.insert(obj);
    }

    public void update(UserTemp obj) {
        mapper.update(obj);
    }

    public List<UserTemp> findAll() {
        return mapper.findAll();
    }

    public List<UserTemp> find(UserTemp obj) {
        return mapper.find(obj);
    }

    public UserTemp findById(Long userTempId){ return mapper.findById(userTempId);}

    public List<UserTemp> findByMobileNum(String mobileNum){ return mapper.findByMobileNum(mobileNum);}

    public void firstLanding(Long userTempId,Long custId){ mapper.firstLanding(userTempId,custId);}

    public List<UserTempExt> findMyApllyedChannel(Long custId){return  extMapper.findMyApllyedChannel(custId);}
    
    public List<UserTempExt> findMyAplly(Long custId){return  extMapper.findMyAplly(custId);}

}
